﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DEEBCG.ExternalLib.CompanyAPI.Model
{
    /// <summary>
    /// 睡眠曲线信息
    /// </summary>
    public class SleepCurveInfo
    {
        public SleepCurveInfo()
        {
            Points = new List<ChartTimePointInfo>();
        }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime
        {
            set;
            get;
        }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime
        {
            set;
            get;
        }

        /// <summary>
        /// 每个刻度的间隔
        /// </summary>
        public double Interval
        {
            set;
            get;
        }

        /// <summary>
        /// 点列表
        /// </summary>
        public List<ChartTimePointInfo> Points
        {
            set; get;
        }
    }


    /// <summary>
    /// 图表绘制点信息
    /// </summary>
    public class ChartTimePointInfo
    {
        /// <summary>
        /// 
        /// </summary>
        public ChartTimePointInfo()
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public ChartTimePointInfo(DateTime x, double y)
        {
            X = x;
            Y = y;
        }

        /// <summary>
        /// X坐标值（图表位置）
        /// </summary>
        public DateTime X
        {
            set;
            get;
        }

        /// <summary>
        /// Y坐标值(数据值)
        /// </summary>
        public double Y
        {
            set;
            get;
        }

        public override string ToString()
        {
            return string.Format("ChartPointInfo[X:{0},Y:{1}]", X, Y);
        }

        public ChartTimePointInfo Clone()
        {
            return this.MemberwiseClone() as ChartTimePointInfo;
        }
    }
}
